<table border=0 cellpadding="1px" cellspacing=0 width="100%">

<CFSET lstNotSubordinate="">
<!--- assume that the maximum no. of employees for ForceLV is 100 --->
<CFLOOP FROM="1" TO="100" INDEX="x">
	<CFIF IsDefined("GetEntry.PERSONNELIDNO#x#") AND Evaluate("GetEntry.PERSONNELIDNO" & x) NEQ "">
		<CFSET sPIDNo=Evaluate("GetEntry.PERSONNELIDNO" & x)>
		
		<!--- check if subordinate --->
		<CFQUERY NAME="qrySubordinate" DATASOURCE=#client.company_dsn#>
			SELECT SUPERIORCODE
			FROM CMFPA
			WHERE PERSONNELIDNO = '#sPIDNo#'
		</CFQUERY>
		
		<CFIF NOT (qrySubordinate.RecordCount AND qrySubordinate.SUPERIORCODE IS client.chapa)>
			<CFSET lstNotSubordinate=lstNotSubordinate & sPIDNo & "<br>">
		</CFIF>
	</CFIF>
</CFLOOP>

<tr>
<td class="bold">
	<CFIF lstNotSubordinate NEQ "">
		<CFSET lstNotSubordinate=Left(lstNotSubordinate, Len(lstNotSubordinate) - 2)>
		<CFOUTPUT>
		  The employees below are not under your supervision:<br>
		  	  #lstNotSubordinate# 
		</CFOUTPUT>
	<CFELSE>	
		<CFSET lPreProcessValidated="Yes">
		Success in checking employees superior code.
	</CFIF>
</td>
</tr>
</table>
